-----------------------------------------------------------------------------------------------------------------------
       log:  Z:\interactionmodels\addresults\electoralparties_golder.log
  log type:  text
 opened on:  10 Jan 2007, 20:28:06

. *     ***************************************************************** *;
. *     ***************************************************************** *;
. *       File-Name:      electoralparties_golder.do                      *;
. *       Date:           01/09/2007                                      *;
. *       Author:         MRG                                             *;
. *       Purpose:        Provide interaction figures for replication     *;
. *                       using Golder (2005) data.                       *;
. *       Input File:     golder1.dta                                     *;
. *       Output File:    electoralparties_golder.log                     *;
. *       Data Output:    none                                            *;
. *       Previous file:                                                  *;
. *       Machine:                                                        *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. set mem 10m;
(10240k)

. use getdata\golder1.dta;

. *     ****************************************************************  *;
. *                         Run correct Model 1                           *;
. *     ****************************************************************  *;
. regress elecparties_nyu logmag_nyu proximity_nyu prescandidate_nyu prox_prescandidate_nyu, robust;

Regression with robust standard errors                 Number of obs =      59
                                                       F(  4,    54) =    6.15
                                                       Prob > F      =  0.0004
                                                       R-squared     =  0.5930
                                                       Root MSE      =  1.9064

------------------------------------------------------------------------------
             |               Robust
elecpartie~u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  logmag_nyu |   .0141907   .1235751     0.11   0.909    -.2335624    .2619437
proximity_~u |  -1.858147   .7591026    -2.45   0.018    -3.380056   -.3362376
prescandid~u |   2.016667   .6546716     3.08   0.003     .7041295    3.329205
prox_presc~u |  -.5324289   .6983754    -0.76   0.449    -1.932587    .8677295
       _cons |   1.182959   .4615915     2.56   0.013     .2575237    2.108394
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *                       Now do interaction figure                       *;
. *     ****************************************************************  *;
. regress elecparties_nyu  proximity_nyu prescandidate_nyu prox_prescandidate_nyu logmag_nyu, robust;

Regression with robust standard errors                 Number of obs =      59
                                                       F(  4,    54) =    6.15
                                                       Prob > F      =  0.0004
                                                       R-squared     =  0.5930
                                                       Root MSE      =  1.9064

------------------------------------------------------------------------------
             |               Robust
elecpartie~u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
proximity_~u |  -1.858147   .7591026    -2.45   0.018    -3.380056   -.3362376
prescandid~u |   2.016667   .6546716     3.08   0.003     .7041295    3.329205
prox_presc~u |  -.5324289   .6983754    -0.76   0.449    -1.932587    .8677295
  logmag_nyu |   .0141907   .1235751     0.11   0.909    -.2335624    .2619437
       _cons |   1.182959   .4615915     2.56   0.013     .2575237    2.108394
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (PRESCANDIDATE) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>80;
(20 real changes made, 20 to missing)

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar covb1b3=V[1,3];

. scalar covb2b3=V[2,3];

. set more off;

. scalar list b1 b2 b3 varb1 varb2 varb3 covb1b3 covb2b3;
        b1 = -1.8581466
        b2 =  2.0166671
        b3 = -.53242889
     varb1 =  .57623675
     varb2 =  .42859496
     varb3 =  .48772824
   covb1b3 = -.30617491
   covb2b3 = -.39744546

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for proximity   *;
. *     ****************************************************************  *;
. gen conb=b1+b3*JH if _n<80;
(21 missing values generated)

. set more off;

. list conb in 1/20;

     +-----------+
     |      conb |
     |-----------|
  1. | -1.858147 |
  2. | -1.911389 |
  3. | -1.964632 |
  4. | -2.017875 |
  5. | -2.071118 |
     |-----------|
  6. | -2.124361 |
  7. | -2.177604 |
  8. | -2.230847 |
  9. |  -2.28409 |
 10. | -2.337332 |
     |-----------|
 11. | -2.390575 |
 12. | -2.443818 |
 13. | -2.497061 |
 14. | -2.550304 |
 15. | -2.603547 |
     |-----------|
 16. |  -2.65679 |
 17. | -2.710033 |
 18. | -2.763276 |
 19. | -2.816519 |
 20. | -2.869761 |
     +-----------+

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse=sqrt(varb1+varb3*JH^2+2*covb1b3*JH)  if _n<80;
(21 missing values generated)

. set more off;

. *     ****************************************************************  *;
. *               Generate confidence intervals at the 95% level          *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. gen a=2.00*conse;
(21 missing values generated)

. gen top=conb+a;
(21 missing values generated)

. gen bottom=conb-a;
(21 missing values generated)

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of proximity on electoral parties conditional  *;
. *       on the number of presidential candidates                        *;
. *     ****************************************************************  *;
.       graph twoway   line conb JH, clwidth(medium) clcolor(blue) clcolor(black)
>         ||  line top  JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  line bottom JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  ,   
>             xlabel(0 1 2 3 4 5 6, labsize(2.5)) 
>             ylabel(-15 -10 -5 0 5, labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             legend(col(1) order(1 2) label(1 "Estimated Causal Effect of Proximity") label(2 "95% Confidence Interval
> ") 
>                   label(3 " "))
>         yline(0, lcolor(black)) yline(-5 5 -10 -15, lcolor(white))  
>             title("Estimated Causal Effect of Temporally-Proximate Presidential Elections", size(4))
>             subtitle(" " "Dependent Variable: Effective Number of Electoral Parties" " ", size(3))
>             xtitle(Effective Number of Presidential Candidates, size(3)  )
>         xsca(titlegap(2))
>         ysca(titlegap(2))
>             ytitle("Estimated Causal Effect of Proximity", size(3))
>         scheme(s2mono) graphregion(fcolor(white));

. *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\proximity1.wmf, replace;
(note: file addresults\proximity1.wmf not found)
(file Z:\interactionmodels\addresults\proximity1.wmf written in Windows Metafile format)

. drop JH conb cons a top bottom;

. *     ****************************************************************  *;
. *           Effect of fragmentation as concentration changes            *;
. *     ****************************************************************  *;
. regress elecparties_nyu  fragmentation concentration frag_conc_nyu, robust;

Regression with robust standard errors                 Number of obs =      59
                                                       F(  3,    55) =    4.04
                                                       Prob > F      =  0.0114
                                                       R-squared     =  0.2542
                                                       Root MSE      =  2.5571

------------------------------------------------------------------------------
             |               Robust
elecpartie~u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.6820195   .2229018    -3.06   0.003    -1.128725   -.2353144
concentrat~n |   -.254344   .6588435    -0.39   0.701    -1.574696    1.066008
frag_conc_~u |   .4026388   .1682006     2.39   0.020     .0655572    .7397204
       _cons |   3.314458   .3857107     8.59   0.000     2.541476    4.087439
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (CONCENTRATION) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>40;
(60 real changes made, 60 to missing)

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar covb1b3=V[1,3];

. scalar covb2b3=V[2,3];

. set more off;

. scalar list b1 b2 b3 varb1 varb2 varb3 covb1b3 covb2b3;
        b1 = -.68201952
        b2 = -.25434397
        b3 =  .40263878
     varb1 =  .04968519
     varb2 =  .43407473
     varb3 =  .02829145
   covb1b3 = -.02730823
   covb2b3 =  -.0876637

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for             *;
. *       fragmentation                                                   *;
. *     ****************************************************************  *;
. gen conb=b1+b3*JH if _n<40;
(61 missing values generated)

. set more off;

. list conb in 1/20;

     +-----------+
     |      conb |
     |-----------|
  1. | -.6820195 |
  2. | -.6417556 |
  3. | -.6014917 |
  4. | -.5612279 |
  5. |  -.520964 |
     |-----------|
  6. | -.4807001 |
  7. | -.4404362 |
  8. | -.4001724 |
  9. | -.3599085 |
 10. | -.3196446 |
     |-----------|
 11. | -.2793807 |
 12. | -.2391169 |
 13. |  -.198853 |
 14. | -.1585891 |
 15. | -.1183252 |
     |-----------|
 16. | -.0780614 |
 17. | -.0377975 |
 18. |  .0024664 |
 19. |  .0427303 |
 20. |  .0829941 |
     +-----------+

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse=sqrt(varb1+varb3*JH^2+2*covb1b3*JH)  if _n<40;
(61 missing values generated)

. set more off;

. *     ****************************************************************  *;
. *               Generate confidence intervals at the 95% level          *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. gen a=2.00*conse;
(61 missing values generated)

. gen top=conb+a;
(61 missing values generated)

. gen bottom=conb-a;
(61 missing values generated)

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of fragmentation on electoral parties          *;
. *       conditional on concentration                                    *;
. *     ****************************************************************  *;
. graph twoway   line conb JH, clwidth(medium) clcolor(black)
>         ||  line top  JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  line bottom JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  ,   
>             xlabel(0 1 2 3 4, labsize(2.5)) 
>             ylabel(-2 -1 0 1 2, labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             legend(col(1) order(1 2) label(1 "Estimated Causal Effect of Fragmentation") label(2 "95% Confidence Inte
> rval") label(3 "Lower bound 95% C.I.") size(3))
>             yline(0, lcolor(black)) yline(-1  1 2, lcolor(white))
>             title(Estimated Causal Effect of Fragmentation, size(4))
>             subtitle(" " "Dependent Variable: Effective Number of Electoral Parties" " ", size(3))
>         xtitle("Concentration Index", size(3))
>         xsca(titlegap(2))
>         ysca(titlegap(2))
>             ytitle("Estimated Causal Effect of Fragmentation", size(3))
>             scheme(s2mono) graphregion(fcolor(white));

.             *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\fragmentation1.wmf, replace;
(note: file addresults\fragmentation1.wmf not found)
(file Z:\interactionmodels\addresults\fragmentation1.wmf written in Windows Metafile format)

. *     ****************************************************************  *;
. *           I want a graph that I can use as an example in the paper    *;
. *           and so I am going to use this one.                          *;
. *     ****************************************************************  *;
. graph twoway   line conb JH, clwidth(medium) clcolor(black)
>         ||  line top  JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  line bottom JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  ,   
>             xlabel(0 1 2 3 4, labsize(2.5)) 
>             ylabel(-2 -1 0 1 2, labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             legend(col(1) order(1 2) label(1 "Estimated Causal Effect of X ") label(2 "95% Confidence Interval") labe
> l(3 "Lower bound 95% C.I.") size(3))
>             yline(0, lcolor(black)) yline(-1  1 2, lcolor(white))
>             title(Figure 1: Estimated Causal Effect of X on Y, size(4))
>             subtitle(" " "Dependent Variable: Y" " ", size(3))
>         xtitle("Conditioning Variable (C)", size(3))
>         xsca(titlegap(2))
>         ysca(titlegap(2))
>             ytitle("Estimated Causal Effect of X", size(3))
>             scheme(s2mono) graphregion(fcolor(white));

. *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\example1.wmf, replace;
(note: file addresults\example1.wmf not found)
(file Z:\interactionmodels\addresults\example1.wmf written in Windows Metafile format)

.          drop JH conb cons a top bottom;

. *     ****************************************************************  *;
. *       Institutional and sociological model - no interaction with      *;
. *       logmag yet.                                                     *;
. *     ****************************************************************  *;
. regress elecparties_nyu  fragmentation concentration frag_conc_nyu logmag_nyu proximity_nyu 
> prescandidate_nyu prox_prescandidate_nyu, robust;

Regression with robust standard errors                 Number of obs =      59
                                                       F(  7,    51) =    7.57
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.6880
                                                       Root MSE      =  1.7177

------------------------------------------------------------------------------
             |               Robust
elecpartie~u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.3334548   .2323342    -1.44   0.157    -.7998852    .1329756
concentrat~n |  -.7055215   .4773589    -1.48   0.146    -1.663859    .2528164
frag_conc_~u |   .3043253   .1490156     2.04   0.046      .005164    .6034867
  logmag_nyu |   .2081185    .201232     1.03   0.306    -.1958715    .6121085
proximity_~u |   -1.15836   .5712929    -2.03   0.048    -2.305279   -.0114422
prescandid~u |   2.048848   .7796397     2.63   0.011     .4836563     3.61404
prox_presc~u |  -.9668863   .6486179    -1.49   0.142    -2.269041    .3352683
       _cons |   1.188483   .8281726     1.44   0.157    -.4741429    2.851109
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (CONCENTRATION) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>40;
(60 real changes made, 60 to missing)

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar covb1b3=V[1,3];

. scalar covb2b3=V[2,3];

. set more off;

. scalar list b1 b2 b3 varb1 varb2 varb3 covb1b3 covb2b3;
        b1 = -.33345478
        b2 = -.70552149
        b3 =  .30432535
     varb1 =  .05397919
     varb2 =  .22787149
     varb3 =  .02220566
   covb1b3 = -.03315874
   covb2b3 = -.05938067

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for             *;
. *           fragmentation                                               *;
. *     ****************************************************************  *;
. gen conb=b1+b3*JH if _n<40;
(61 missing values generated)

. set more off;

. list conb in 1/20;

     +-----------+
     |      conb |
     |-----------|
  1. | -.3334548 |
  2. | -.3030222 |
  3. | -.2725897 |
  4. | -.2421572 |
  5. | -.2117246 |
     |-----------|
  6. | -.1812921 |
  7. | -.1508596 |
  8. |  -.120427 |
  9. | -.0899945 |
 10. |  -.059562 |
     |-----------|
 11. | -.0291294 |
 12. |  .0013031 |
 13. |  .0317357 |
 14. |  .0621682 |
 15. |  .0926007 |
     |-----------|
 16. |  .1230332 |
 17. |  .1534658 |
 18. |  .1838983 |
 19. |  .2143308 |
 20. |  .2447634 |
     +-----------+

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse=sqrt(varb1+varb3*JH^2+2*covb1b3*JH)  if _n<40;
(61 missing values generated)

. set more off;

. *     ****************************************************************  *;
. *               Generate confidence intervals at the 95% level          *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. gen a=2.00*conse;
(61 missing values generated)

. gen top=conb+a;
(61 missing values generated)

. gen bottom=conb-a;
(61 missing values generated)

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of fragmentation on electoral parties          *;
. *       conditional on concentration                                    *;
. *     ****************************************************************  *;
.               graph twoway   line conb JH, clwidth(medium) 
>         ||  line top  JH, clpattern(dash) clwidth(thin) 
>         ||  line bottom JH, clpattern(dash) clwidth(thin) 
>         ||  ,   
>             xlabel(0 1 2 3 4, labsize(2.5)) 
>             ylabel(-2 -1 0 1 2 , labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             legend(col(1) order(1 2) size(2.8) label(1 "Estimated Causal Effect of Fragmentation") label(2 "95% Confi
> dence Interval") label(3 "95% C.I."))
>             yline(0, lcolor(black))  yline(-1 1 2, lcolor(white)) 
>             title(Estimated Causal Effect of Fragmentation, size(4))
>         subtitle(" " "Dependent Variable: Effective Number of Electoral Parties" " ", size(3))
>         xtitle("Concentration Index" " ", size(2.8))
>             ytitle(Estimated Causal Effect of Fragmentation, size(2.8))
>         xsca(titlegap(2))
>         ysca(titlegap(2))
>         scheme(s2mono) graphregion(fcolor(white));

.         *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\fragmentation2.wmf, replace;
(note: file addresults\fragmentation2.wmf not found)
(file Z:\interactionmodels\addresults\fragmentation2.wmf written in Windows Metafile format)

. drop JH conb cons a top bottom;

. *     ****************************************************************  *;
. *       Institutional and sociological model - with interaction with    *;
. *       logmag now.                                                     *;
. *     ****************************************************************  *;
. regress elecparties_nyu  fragmentation concentration logmag_nyu
>          frag_conc_nyu logmag_frag_nyu logmag_conc_nyu proximity_nyu 
>          prescandidate_nyu prox_prescandidate_nyu, robust;

Regression with robust standard errors                 Number of obs =      59
                                                       F(  9,    49) =   10.71
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.7535
                                                       Root MSE      =  1.5575

------------------------------------------------------------------------------
             |               Robust
elecpartie~u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.8038256   .1985979    -4.05   0.000    -1.202923   -.4047281
concentrat~n |  -.9614199    .443727    -2.17   0.035    -1.853123   -.0697171
  logmag_nyu |   -1.16097   .5782734    -2.01   0.050    -2.323054    .0011138
frag_conc_~u |   .3918937   .1180739     3.32   0.002     .1546153    .6291721
logmag~g_nyu |   .1956725   .0641481     3.05   0.004     .0667621    .3245829
logmag_con~u |   .2456161   .2126795     1.15   0.254    -.1817794    .6730115
proximity_~u |  -.4790298   .7043742    -0.68   0.500    -1.894523    .9364631
prescandid~u |   2.089261   .6722733     3.11   0.003     .7382777    3.440245
prox_presc~u |  -1.062431   .5595257    -1.90   0.063     -2.18684    .0619779
       _cons |    2.57952   .5807013     4.44   0.000     1.412557    3.746483
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (LOGMAG) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>30;
(70 real changes made, 70 to missing)

. generate str1 txt="*";

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar b4=b[1,4];

. scalar b5=b[1,5];

. scalar b6=b[1,6];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar varb4=V[4,4];

. scalar varb5=V[5,5];

. scalar varb6=V[6,6];

. scalar covb1b4=V[1,4];

. scalar covb1b5=V[1,5];

. scalar covb4b5=V[4,5];

. set more off;

. scalar list b1 b2 b3 b4 b5 b6 varb1 varb2 varb3 varb4 varb5 varb6 covb1b4 covb1b5 covb4b5;
        b1 = -.80382557
        b2 = -.96141995
        b3 = -1.1609702
        b4 =  .39189367
        b5 =   .1956725
        b6 =  .24561607
     varb1 =  .03944113
     varb2 =  .19689367
     varb3 =  .33440018
     varb4 =  .01394145
     varb5 =  .00411498
     varb6 =  .04523257
   covb1b4 = -.01867234
   covb1b5 = -.00424205
   covb4b5 = -.00142061

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for             *;
. *       fragmentation                                                   *;
. *     ****************************************************************  *;
. gen conb0=b1+b4*0+b5*JH if _n<30;
(71 missing values generated)

. gen conb1=b1+b4*1+b5*JH if _n<30;
(71 missing values generated)

. gen conb2=b1+b4*2+b5*JH if _n<30;
(71 missing values generated)

. gen conb3=b1+b4*3+b5*JH if _n<30;
(71 missing values generated)

. gen conb4=b1+b4*4+b5*JH if _n<30;
(71 missing values generated)

. set more off;

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse0=sqrt(varb1 + varb4*(0^2) + varb5*(JH^2)
>                 + 2*0*covb1b4 + 2*JH*covb1b5 + 2*0*JH*covb4b5)  if _n<30;
(71 missing values generated)

.                 gen conse1=sqrt(varb1 + varb4*(1^2) + varb5*(JH^2)
>                 + 2*1*covb1b4 + 2*JH*covb1b5 + 2*1*JH*covb4b5)  if _n<30;
(71 missing values generated)

.                 gen conse2=sqrt(varb1 + varb4*(2^2) + varb5*(JH^2)
>                 + 2*2*covb1b4 + 2*JH*covb1b5 + 2*2*JH*covb4b5)  if _n<30;
(71 missing values generated)

.                 gen conse3=sqrt(varb1 + varb4*(3^2) + varb5*(JH^2)
>                 + 2*3*covb1b4 + 2*JH*covb1b5 + 2*3*JH*covb4b5)  if _n<30;
(71 missing values generated)

.                 gen conse4=sqrt(varb1 + varb4*(4^2) + varb5*(JH^2)
>                 + 2*4*covb1b4 + 2*JH*covb1b5 + 2*4*JH*covb4b5)  if _n<30;
(71 missing values generated)

.                 set more off;

. *     ****************************************************************  *;
. *                           Create t statistics                         *;
. *     ****************************************************************  *;
. gen t0=conb0/conse0;
(71 missing values generated)

. gen t1=conb1/conse1;
(71 missing values generated)

. gen t2=conb2/conse2;
(71 missing values generated)

. gen t3=conb3/conse3;
(71 missing values generated)

. gen t4=conb4/conse4;
(71 missing values generated)

. *     ****************************************************************  *;
. *       Generate a variable equal to conditional betas                  *;
. *     ****************************************************************  *;
. gen consb0=conb0;
(71 missing values generated)

. gen consb1=conb1;
(71 missing values generated)

. gen consb2=conb2;
(71 missing values generated)

. gen consb3=conb3;
(71 missing values generated)

. gen consb4=conb4;
(71 missing values generated)

. *     ****************************************************************  *;
. *       Replace consb_ = missing if t score not bigger than cutoff      *;
. *     ****************************************************************  *;
. replace consb0 = . if abs(t0)<2.01;
(8 real changes made, 8 to missing)

. replace consb1 = . if abs(t1)<2.01;
(17 real changes made, 17 to missing)

. replace consb2 = . if abs(t2)<2.01;
(12 real changes made, 12 to missing)

. replace consb3 = . if abs(t3)<2.01;
(4 real changes made, 4 to missing)

. replace consb4 = . if abs(t4)<2.01;
(0 real changes made)

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of fragmentation on electoral parties          *;
. *       conditional on logmag                                           *;
. *     ****************************************************************  *;
. graph twoway   line conb0 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb0 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb1 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb1 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb2 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb2 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb3 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb3 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)        
>         ||  line conb4 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb4 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  ,   
>             ysize(6)
>             xsize(8)
>             xlabel(0 1 2 3 , labsize(2.5)) 
>             ylabel(-1 0 1 2 , labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             legend(off)
>             yline(0, lcolor(black)) yline(-1 1 2, lcolor(white))  
>             title(Estimated Causal Effect of Fragmentation, size(4))
>             xtitle(Logged Average District Magnitude, size(3))
>             ytitle(Estimated Causal Effect of Fragmentation, size(3))
>         xsca(titlegap(2))
>         ysca(titlegap(3))
>         text(1.35 3.25 "Concentration Index=4", justification(left) size(2.5))
>         text(0.95 3.25 "Concentration Index=3", justification(left) size(2.5))
>         text(0.55 3.25 "Concentration Index=2", justification(left) size(2.5))
>         text(0.15 3.25 "Concentration Index=1", justification(left) size(2.5))
>         text(-0.25 3.25 "Concentration Index=0", justification(left) size(2.5))
>         text(1.9 1 "* indicates significance at the 95% level", justification(left) size(2.5))
>         subtitle(" " "Dependent Variable: Effective Number of Electoral Parties" " ", size(3))
>         scheme(s2mono) graphregion(fcolor(white))
>         graphregion(margin(r=24));

.         *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\fragmentation3.wmf, replace;
(note: file addresults\fragmentation3.wmf not found)
(file Z:\interactionmodels\addresults\fragmentation3.wmf written in Windows Metafile format)

.             drop JH conb0 conb1 conb2 conb3 conb4 consb0 consb1 consb2 consb3 consb4 conse0 conse1 conse2 conse3 cons
> e4 t0 t1 t2 t3 t4 txt;

. *     ****************************************************************  *;
. *       Institutional and sociological model - with interaction with    *;
. *       logmag and now with triple interaction included.                *;
. *     ****************************************************************  *;
. regress elecparties_nyu  fragmentation concentration logmag_nyu 
>         frag_conc_nyu logmag_frag_nyu logmag_conc_nyu 
>         logmag_frag_conc_nyu proximity_nyu prescandidate_nyu 
>         prox_prescandidate_nyu, robust;

Regression with robust standard errors                 Number of obs =      59
                                                       F( 10,    48) =    8.65
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.7635
                                                       Root MSE      =  1.5414

------------------------------------------------------------------------------
             |               Robust
elecpartie~u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.5267029   .1878025    -2.80   0.007    -.9043051   -.1491008
concentrat~n |  -.4329657   .4733036    -0.91   0.365    -1.384606     .518675
  logmag_nyu |  -.6890128   .6357467    -1.08   0.284    -1.967267    .5892415
frag_conc_~u |    .223128   .1195404     1.87   0.068    -.0172241      .46348
logmag~g_nyu |    .052534   .0880736     0.60   0.554    -.1245497    .2296178
logmag_con~u |  -.1545236   .3091386    -0.50   0.619    -.7760884    .4670411
logmag_fra.. |   .1093734   .0503856     2.17   0.035     .0080663    .2106805
proximity_~u |  -.3877888    .661529    -0.59   0.560    -1.717882    .9423044
prescandid~u |   2.037605   .6719336     3.03   0.004     .6865916    3.388618
prox_presc~u |  -1.027223   .5525219    -1.86   0.069    -2.138143    .0836966
       _cons |   1.879704   .6332156     2.97   0.005     .6065392     3.15287
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (LOGMAG) = JH              *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>30;
(70 real changes made, 70 to missing)

. generate str1 txt="*";

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar b4=b[1,4];

. scalar b5=b[1,5];

. scalar b6=b[1,6];

. scalar b7=b[1,7];

. scalar b8=b[1,8];

. scalar b9=b[1,9];

. scalar b10=b[1,10];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar varb4=V[4,4];

. scalar varb5=V[5,5];

. scalar varb6=V[6,6];

. scalar varb7=V[7,7];

. scalar varb8=V[8,8];

. scalar varb9=V[9,9];

. scalar varb10=V[10,10];

. scalar covb1b4=V[1,4];

. scalar covb1b5=V[1,5];

. scalar covb1b7=V[1,7];

. scalar covb3b5=V[3,5];

. scalar covb3b6=V[3,6];

. scalar covb3b7=V[3,7];

. scalar covb5b6=V[5,6];

. scalar covb6b7=V[6,7];

. scalar covb4b5=V[4,5];

. scalar covb4b7=V[4,7];

. scalar covb5b7=V[5,7];

. set more off;

. scalar list b1 b2 b3 b4 b5 b6 b7 varb1 varb2 varb3 varb4 varb5 varb6 varb7 
>             covb1b4 covb1b5 covb1b7 covb4b5 covb4b7 covb5b7;
        b1 = -.52670292
        b2 = -.43296566
        b3 = -.68901281
        b4 =  .22312797
        b5 =  .05253404
        b6 = -.15452362
        b7 =   .1093734
     varb1 =  .03526976
     varb2 =  .22401629
     varb3 =  .40417382
     varb4 =   .0142899
     varb5 =  .00775695
     varb6 =  .09556666
     varb7 =  .00253871
   covb1b4 = -.01794432
   covb1b5 = -.00733698
   covb1b7 =  .00282744
   covb4b5 =  .00100324
   covb4b7 = -.00212475
   covb5b7 = -.00306603

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for             *;
. *       fragmentation                                                   *;
. *     ****************************************************************  *;
. gen conb0=b1+b4*0+b5*JH+b7*(0*JH) if _n<30;
(71 missing values generated)

. gen conb1=b1+b4*1+b5*JH+b7*(1*JH) if _n<30;
(71 missing values generated)

. gen conb2=b1+b4*2+b5*JH+b7*(2*JH) if _n<30;
(71 missing values generated)

. gen conb3=b1+b4*3+b5*JH+b7*(3*JH) if _n<30;
(71 missing values generated)

. gen conb4=b1+b4*4+b5*JH+b7*(4*JH) if _n<30;
(71 missing values generated)

. set more off;

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse0=sqrt(varb1
>                 + varb4*0 + varb5*JH^2 + varb7*JH^2*(0^2)
>                 + 2*0*covb1b4 + 2*JH*covb1b5 + 2*0*JH*covb1b7+2*0*JH*covb4b5
>                 + 2*(0^2)*JH*covb4b7 + 2*0*(JH^2)*covb5b7)  if _n<30;
(71 missing values generated)

.                 gen conse1=sqrt(varb1
>                 + varb4*1 + varb5*JH^2 + varb7*JH^2*(1^2)
>                 + 2*1*covb1b4 + 2*JH*covb1b5 + 2*1*JH*covb1b7+2*1*JH*covb4b5
>                 + 2*(1^2)*JH*covb4b7 + 2*1*(JH^2)*covb5b7)  if _n<30;
(71 missing values generated)

.                 gen conse2=sqrt(varb1
>                 + varb4*4 + varb5*JH^2 + varb7*JH^2*(2^2)
>                 + 2*2*covb1b4 + 2*JH*covb1b5 + 2*2*JH*covb1b7+2*2*JH*covb4b5
>                 + 2*(2^2)*JH*covb4b7 + 2*2*(JH^2)*covb5b7)  if _n<30;
(71 missing values generated)

.                 gen conse3=sqrt(varb1
>                 + varb4*9 + varb5*JH^2 + varb7*JH^2*(3^2)
>                 + 2*3*covb1b4 + 2*JH*covb1b5 + 2*3*JH*covb1b7+2*3*JH*covb4b5
>                 + 2*(3^2)*JH*covb4b7 + 2*3*(JH^2)*covb5b7)  if _n<30;
(71 missing values generated)

.                 gen conse4=sqrt(varb1
>                 + varb4*16 + varb5*JH^2 + varb7*JH^2*(4^2)
>                 + 2*4*covb1b4 + 2*JH*covb1b5 + 2*4*JH*covb1b7+2*4*JH*covb4b5
>                 + 2*(4^2)*JH*covb4b7 + 2*4*(JH^2)*covb5b7)  if _n<30;
(71 missing values generated)

.                 set more off;

. *     ****************************************************************  *;
. *                           Create t statistics                         *;
. *     ****************************************************************  *;
. gen t0=conb0/conse0;
(71 missing values generated)

. gen t1=conb1/conse1;
(71 missing values generated)

. gen t2=conb2/conse2;
(71 missing values generated)

. gen t3=conb3/conse3;
(71 missing values generated)

. gen t4=conb4/conse4;
(71 missing values generated)

. *     ****************************************************************  *;
. *       Generate a variable equal to conditional betas                  *;
. *     ****************************************************************  *;
. gen consb0=conb0;
(71 missing values generated)

. gen consb1=conb1;
(71 missing values generated)

. gen consb2=conb2;
(71 missing values generated)

. gen consb3=conb3;
(71 missing values generated)

. gen consb4=conb4;
(71 missing values generated)

. *     ****************************************************************  *;
. *       Replace consb_ = missing if t score not bigger than cutoff      *;
. *     ****************************************************************  *;
. replace consb0 = . if abs(t0)<2.01;
(6 real changes made, 6 to missing)

. replace consb1 = . if abs(t1)<2.01;
(20 real changes made, 20 to missing)

. replace consb2 = . if abs(t2)<2.01;
(11 real changes made, 11 to missing)

. replace consb3 = . if abs(t3)<2.01;
(7 real changes made, 7 to missing)

. replace consb4 = . if abs(t4)<2.01;
(6 real changes made, 6 to missing)

. set textsize 100;

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of fragmentation on electoral parties          *;
. *       conditional on logmag                                           *;
. *     ****************************************************************  *;
. graph twoway   line conb0 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb0 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb1 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb1 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb2 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb2 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb3 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb3 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)        
>         ||  line conb4 JH , clpattern(solid) clwidth(thin)
>         ||  scatter consb4 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  ,   
>             ysize(6)
>             xsize(8)
>             xlabel(0 1 2 3, labsize(2.5)) 
>             ylabel(-1 0 1 2 , labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             legend(off)
>             yline(0, lcolor(black)) yline(-1 1 2 3 4, lcolor(white)) 
>             title(Estimated Causal Effect of Fragmentation, size(4))
>             xtitle(Logged Average District Magnitude, size(3))
>             ytitle(Estimated Causal Effect of Fragmentation, size(3))
>         xsca(titlegap(2)) ysca(titlegap(4))
>         text(1.8 3.3 "Concentration Index=4", justification(left) size(2.5))
>         text(1.27 3.3 "Concentration Index=3", justification(left) size(2.5))
>         text(0.72 3.3 "Concentration Index=2", justification(left) size(2.5))
>         text(0.18 3.3 "Concentration Index=1", justification(left) size(2.5))
>         text(-0.38 3.3 "Concentration Index=0", justification(left) size(2.5))
>         text(2 1 "* indicates significance at the 95% level", justification(left) size(2.5))
>         subtitle(" " "Dependent Variable: Effective Number of Electoral Parties" " " " ", size(3))
>         scheme(s2mono) graphregion(fcolor(white))
>         graphregion(margin(r=28));

. *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\fragmentation4.wmf, replace;
(note: file addresults\fragmentation4.wmf not found)
(file Z:\interactionmodels\addresults\fragmentation4.wmf written in Windows Metafile format)

.             set textsize 100;

. *     ****************************************************************  *;
. *       Proximity                                                       *;
. *     ****************************************************************  *;
. drop JH conb0 conb1 conb2 conb3 conb4 consb0 consb1 consb2 consb3 consb4 conse0 conse1 conse2 conse3 conse4 t0 t1 t2 
> t3 t4 txt;

. regress elecparties_nyu  fragmentation concentration logmag_nyu frag_conc_nyu logmag_frag_nyu  
> logmag_conc_nyu logmag_frag_conc_nyu proximity_nyu prescandidate_nyu prox_prescandidate_nyu, robust;

Regression with robust standard errors                 Number of obs =      59
                                                       F( 10,    48) =    8.65
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.7635
                                                       Root MSE      =  1.5414

------------------------------------------------------------------------------
             |               Robust
elecpartie~u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.5267029   .1878025    -2.80   0.007    -.9043051   -.1491008
concentrat~n |  -.4329657   .4733036    -0.91   0.365    -1.384606     .518675
  logmag_nyu |  -.6890128   .6357467    -1.08   0.284    -1.967267    .5892415
frag_conc_~u |    .223128   .1195404     1.87   0.068    -.0172241      .46348
logmag~g_nyu |    .052534   .0880736     0.60   0.554    -.1245497    .2296178
logmag_con~u |  -.1545236   .3091386    -0.50   0.619    -.7760884    .4670411
logmag_fra.. |   .1093734   .0503856     2.17   0.035     .0080663    .2106805
proximity_~u |  -.3877888    .661529    -0.59   0.560    -1.717882    .9423044
prescandid~u |   2.037605   .6719336     3.03   0.004     .6865916    3.388618
prox_presc~u |  -1.027223   .5525219    -1.86   0.069    -2.138143    .0836966
       _cons |   1.879704   .6332156     2.97   0.005     .6065392     3.15287
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (PRESCANDIDATE) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>80;
(20 real changes made, 20 to missing)

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar b4=b[1,4];

. scalar b5=b[1,5];

. scalar b6=b[1,6];

. scalar b7=b[1,7];

. scalar b8=b[1,8];

. scalar b9=b[1,9];

. scalar b10=b[1,10];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar varb4=V[4,4];

. scalar varb5=V[5,5];

. scalar varb6=V[6,6];

. scalar varb7=V[7,7];

. scalar varb8=V[8,8];

. scalar varb9=V[9,9];

. scalar varb10=V[10,10];

. scalar covb1b4=V[1,4];

. scalar covb1b5=V[1,5];

. scalar covb1b7=V[1,7];

. scalar covb3b5=V[3,5];

. scalar covb3b6=V[3,6];

. scalar covb3b7=V[3,7];

. scalar covb5b6=V[5,6];

. scalar covb6b7=V[6,7];

. scalar covb4b5=V[4,5];

. scalar covb4b7=V[4,7];

. scalar covb5b7=V[5,7];

. scalar covb8b10=V[8,10];

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for proximity   *;
. *     ****************************************************************  *;
. gen conb=b8+b10*JH if _n<80;
(21 missing values generated)

. set more off;

. list conb in 1/20;

     +-----------+
     |      conb |
     |-----------|
  1. | -.3877888 |
  2. | -.4905111 |
  3. | -.5932334 |
  4. | -.6959558 |
  5. |  -.798678 |
     |-----------|
  6. | -.9014004 |
  7. | -1.004123 |
  8. | -1.106845 |
  9. | -1.209567 |
 10. |  -1.31229 |
     |-----------|
 11. | -1.415012 |
 12. | -1.517734 |
 13. | -1.620457 |
 14. | -1.723179 |
 15. | -1.825901 |
     |-----------|
 16. | -1.928624 |
 17. | -2.031346 |
 18. | -2.134068 |
 19. |  -2.23679 |
 20. | -2.339513 |
     +-----------+

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse=sqrt(varb8+varb10*JH^2+2*covb8b10*JH)  if _n<80;
(21 missing values generated)

. set more off;

. *     ****************************************************************  *;
. *               Generate confidence intervals at the 95% level          *;
. *     ****************************************************************  *;
. *     ****************************************************************  *;
. gen a=2.01*conse;
(21 missing values generated)

. gen top=conb+a;
(21 missing values generated)

. gen bottom=conb-a;
(21 missing values generated)

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of proximity on electoral parties conditional  *;
. *       on the number of presidential candidates                        *;
. *     ****************************************************************  *;
. graph twoway   line conb JH, clwidth(medium) clcolor(blue) clcolor(black)
>         ||  line top  JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  line bottom JH, clpattern(dash) clwidth(thin) clcolor(black)
>         ||  ,   
>             xlabel(0 1 2 3 4 5 6, labsize(2.5)) 
>             ylabel(5 0 5  , labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             legend(col(1) order(1 2) label(1 "Estimated Causal Effect of Proximity") label(2 "95% Confidence Interval
> ") 
>                   label(3 " "))
>         yline(0, lcolor(black)) yline(-5 5, lcolor(white))  
>             title("Estimated Causal Effect of Temporally-Proximate Presidential Elections", size(4))
>             subtitle(" " "Dependent Variable: Effective Number of Electoral Parties" " ", size(3))
>             xtitle(Effective Number of Presidential Candidates, size(3)  )
>         xsca(titlegap(2))
>         ysca(titlegap(2))
>             ytitle("Estimated Causal Effect of Proximity", size(3))
>         scheme(s2mono) graphregion(fcolor(white));

. *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\proximity2.wmf, replace;
(note: file addresults\proximity2.wmf not found)
(file Z:\interactionmodels\addresults\proximity2.wmf written in Windows Metafile format)

. drop JH conb top bottom a;

. *     ****************************************************************  *;
. *           Now calculate the marginal causal effect of logmag as       *;
. *           fragmentation changes                                       *;
. *     ****************************************************************  *;
. regress elecparties_nyu  fragmentation concentration logmag_nyu frag_conc_nyu logmag_frag_nyu  
> logmag_conc_nyu logmag_frag_conc_nyu proximity_nyu prescandidate_nyu prox_prescandidate_nyu, robust;

Regression with robust standard errors                 Number of obs =      59
                                                       F( 10,    48) =    8.65
                                                       Prob > F      =  0.0000
                                                       R-squared     =  0.7635
                                                       Root MSE      =  1.5414

------------------------------------------------------------------------------
             |               Robust
elecpartie~u |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
fragmentat~n |  -.5267029   .1878025    -2.80   0.007    -.9043051   -.1491008
concentrat~n |  -.4329657   .4733036    -0.91   0.365    -1.384606     .518675
  logmag_nyu |  -.6890128   .6357467    -1.08   0.284    -1.967267    .5892415
frag_conc_~u |    .223128   .1195404     1.87   0.068    -.0172241      .46348
logmag~g_nyu |    .052534   .0880736     0.60   0.554    -.1245497    .2296178
logmag_con~u |  -.1545236   .3091386    -0.50   0.619    -.7760884    .4670411
logmag_fra.. |   .1093734   .0503856     2.17   0.035     .0080663    .2106805
proximity_~u |  -.3877888    .661529    -0.59   0.560    -1.717882    .9423044
prescandid~u |   2.037605   .6719336     3.03   0.004     .6865916    3.388618
prox_presc~u |  -1.027223   .5525219    -1.86   0.069    -2.138143    .0836966
       _cons |   1.879704   .6332156     2.97   0.005     .6065392     3.15287
------------------------------------------------------------------------------

. *     ****************************************************************  *;
. *       Create x-axis for modifying variable (FRAGMENTATION) = JH       *;
. *     ****************************************************************  *;
. generate JH=((_n-1)/10);

.     replace JH=. if _n>100;
(0 real changes made)

. generate str1 txt="*";

. *     ****************************************************************  *;
. *       Grab elements of the matrix required for calculating            *;
. *       conditional coefficients and standard errors.                   *;
. *     ****************************************************************  *;
. matrix b=e(b);

. matrix V=e(V);

. scalar b1=b[1,1];

. scalar b2=b[1,2];

. scalar b3=b[1,3];

. scalar b4=b[1,4];

. scalar b5=b[1,5];

. scalar b6=b[1,6];

. scalar b7=b[1,7];

. scalar b8=b[1,8];

. scalar b9=b[1,9];

. scalar b10=b[1,10];

. scalar varb1=V[1,1];

. scalar varb2=V[2,2];

. scalar varb3=V[3,3];

. scalar varb4=V[4,4];

. scalar varb5=V[5,5];

. scalar varb6=V[6,6];

. scalar varb7=V[7,7];

. scalar varb8=V[8,8];

. scalar varb9=V[9,9];

. scalar varb10=V[10,10];

. scalar covb1b4=V[1,4];

. scalar covb1b5=V[1,5];

. scalar covb1b7=V[1,7];

. scalar covb3b4=V[3,4];

. scalar covb3b5=V[3,5];

. scalar covb3b6=V[3,6];

. scalar covb3b7=V[3,7];

. scalar covb4b5=V[4,5];

. scalar covb4b7=V[4,7];

. scalar covb5b6=V[5,6];

. scalar covb5b7=V[5,7];

. scalar covb6b7=V[6,7];

. set more off;

. scalar list b1 b2 b3 b4 b5 b6 b7 varb1 varb2 varb3 varb4 varb5 varb6 varb7 
>             covb1b4 covb1b5 covb1b7 covb4b5 covb4b7 covb5b7;
        b1 = -.52670292
        b2 = -.43296566
        b3 = -.68901281
        b4 =  .22312797
        b5 =  .05253404
        b6 = -.15452362
        b7 =   .1093734
     varb1 =  .03526976
     varb2 =  .22401629
     varb3 =  .40417382
     varb4 =   .0142899
     varb5 =  .00775695
     varb6 =  .09556666
     varb7 =  .00253871
   covb1b4 = -.01794432
   covb1b5 = -.00733698
   covb1b7 =  .00282744
   covb4b5 =  .00100324
   covb4b7 = -.00212475
   covb5b7 = -.00306603

. *     ****************************************************************  *;
. *         Create full range of conditional coefficients for logmag      *;
. *     ****************************************************************  *;
. gen conb0=b3+b5*JH+b6*0+b7*(0*JH) if _n<100;
(1 missing value generated)

. gen conb1=b3+b5*JH+b6*1+b7*(1*JH) if _n<100;
(1 missing value generated)

. gen conb2=b3+b5*JH+b6*2+b7*(2*JH) if _n<100;
(1 missing value generated)

. gen conb3=b3+b5*JH+b6*3+b7*(3*JH) if _n<100;
(1 missing value generated)

. gen conb4=b3+b5*JH+b6*4+b7*(4*JH) if _n<100;
(1 missing value generated)

. set more off;

. *     ****************************************************************  *;
. *           Create full range of conditional standard errors            *;
. *     ****************************************************************  *;
. gen conse0=sqrt(varb3
>                 + varb5*JH^2 + varb6*(0^2) + varb7*(JH^2)*(0^2)
>                 + 2*JH*covb3b5 + 2*0*covb3b6 + 2*0*JH*covb3b7 + 2*0*JH*covb5b6
>                 + 2*0*(JH^2)*covb5b7) + 2*(0^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse1=sqrt(varb3
>                 + varb5*JH^2 + varb6*(1^2) + varb7*(JH^2)*(1^2)
>                 + 2*JH*covb3b5 + 2*1*covb3b6 + 2*1*JH*covb3b7 + 2*1*JH*covb5b6
>                 + 2*1*(JH^2)*covb5b7) + 2*(1^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse2=sqrt(varb3
>                 + varb5*JH^2 + varb6*(2^2) + varb7*(JH^2)*(2^2)
>                 + 2*JH*covb3b5 + 2*2*covb3b6 + 2*2*JH*covb3b7 + 2*2*JH*covb5b6
>                 + 2*2*(JH^2)*covb5b7) + 2*(2^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse3=sqrt(varb3
>                 + varb5*JH^2 + varb6*(3^2) + varb7*(JH^2)*(3^2)
>                 + 2*JH*covb3b5 + 2*3*covb3b6 + 2*3*JH*covb3b7 + 2*3*JH*covb5b6
>                 + 2*3*(JH^2)*covb5b7) + 2*(3^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                 gen conse4=sqrt(varb3
>                 + varb5*JH^2 + varb6*(4^2) + varb7*(JH^2)*(4^2)
>                 + 2*JH*covb3b5 + 2*4*covb3b6 + 2*4*JH*covb3b7 + 2*4*JH*covb5b6
>                 + 2*4*(JH^2)*covb5b7) + 2*(4^2)*JH*covb6b7  if _n<100;
(1 missing value generated)

.                                set more off;

. *     ****************************************************************  *;
. *                           Create t statistics                         *;
. *     ****************************************************************  *;
. gen t0=conb0/conse0;
(1 missing value generated)

. gen t1=conb1/conse1;
(1 missing value generated)

. gen t2=conb2/conse2;
(1 missing value generated)

. gen t3=conb3/conse3;
(1 missing value generated)

. gen t4=conb4/conse4;
(1 missing value generated)

. *     ****************************************************************  *;
. *       Generate a variable equal to conditional betas                  *;
. *     ****************************************************************  *;
. gen consb0=conb0;
(1 missing value generated)

. gen consb1=conb1;
(1 missing value generated)

. gen consb2=conb2;
(1 missing value generated)

. gen consb3=conb3;
(1 missing value generated)

. gen consb4=conb4;
(1 missing value generated)

. *     ****************************************************************  *;
. *       Replace consb_ = missing if t score not bigger than cutoff      *;
. *     ****************************************************************  *;
. replace consb0 = . if abs(t0)<2.01;
(99 real changes made, 99 to missing)

. replace consb1 = . if abs(t1)<2.01;
(90 real changes made, 90 to missing)

. replace consb2 = . if abs(t2)<2.01;
(53 real changes made, 53 to missing)

. replace consb3 = . if abs(t3)<2.01;
(38 real changes made, 38 to missing)

. replace consb4 = . if abs(t4)<2.01;
(30 real changes made, 30 to missing)

. set textsize 100;

. *     ****************************************************************  *;
. *       Graph the effect of logmag on electoral parties conditional on  *;
. *       fragmentation                                                   *;
. *     ****************************************************************  *;
. graph twoway   line conb0 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb0 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb1 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb1 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb2 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb2 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  line conb3 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb3 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)        
>         ||  line conb4 JH , clpattern(solid) clwidth(vthin)
>         ||  scatter consb4 JH,  mlabel(txt) msymbol(i) mlabsize(vsmall) mlabgap(-1.0) mlabposition(11)
>         ||  ,   
>             ysize(6)
>             xsize(8)
>             title(Estimated Causal Effect of Logged Average District Magnitude, size(4) justification(center))
>             subtitle(" " "Dependent Variable: Effective Number of Electoral Parties" " " " ", size(3) justification(c
> enter))
>             xlabel(0 1 2 3 4 5 6 7 8 9 10, labsize(2.5)) 
>             ylabel(-2 -1 0 1 2 3 4 , labsize(2.5))
>             yscale(noline)
>             xscale(noline)
>             yline(0, lcolor(black)) yline(-2 -1  1 2 3 4 , lcolor(white)) 
>             xtitle(Fragmentation Index, size(3))
>             ytitle("Estimated Causal Effect of Logged Average" "District Magnitude", size(3))
>             xsca(titlegap(2))
>             ysca(titlegap(4.5))
>             text(3.6 11.40 "Concentration Index=4", justification(left) size(2.5))
>             text(2.7 11.40 "ConcentrationIndex=3", justification(left) size(2.5))
>             text(1.7 11.40 "Concentration Index=2", justification(left) size(2.5))
>             text(0.8 11.40 "Concentration Index=1", justification(left) size(2.5))
>             text(-0.2 11.40 "Concentrationn Index=0", justification(left) size(2.5))
>             text(3.9 2.7 "* indicates significance at the 95% level", justification(left) size(2.5))
>             legend(off)
>             scheme(s2mono) graphregion(fcolor(white))
>             graphregion(margin(r=28));

. *     ****************************************************************  *;
. *                               Save picture                            *;
. *     ****************************************************************  *;
. translate @Graph addresults\logmag1.wmf, replace;
(note: file addresults\logmag1.wmf not found)
(file Z:\interactionmodels\addresults\logmag1.wmf written in Windows Metafile format)

. log close;
       log:  Z:\interactionmodels\addresults\electoralparties_golder.log
  log type:  text
 closed on:  10 Jan 2007, 20:28:38
-----------------------------------------------------------------------------------------------------------------------
